<?php
    @include_once("conn.php");
    @header("Content-type:text/json;chaset=utf-8");
       
    $obj = array();

    $gid = $_GET["gid"];

    if(!($gid)){
        $obj["status"] = false;
        $obj["detail"] = "请输入完整的参数";
        exit(json_encode($obj));
    }
    
    $sql = "select * from `goodslist` where goodsId = '$gid'";
    
    $result = mysqli_query($conn,$sql);
    
    

    $item = mysqli_fetch_assoc($result);
    // $bigImg = 
    // print_r($item);
    $item["bigPicList"] = explode(",",$item["bigPicList"]);
    $item["smallPicList"] = explode(",",$item["smallPicList"]);
    if ($item) {
        $obj["status"] = true;
        $obj["detail"] = "succeed";
        $obj["list"] = $item;
    }else{
        $obj["status"] = false;
        $obj["detail"] = "fail";
    }

    echo json_encode($obj);

?>